home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
program
/
vol16n09.zip
/
MFCTIP.ZIP
/
GRAY.TXT
next >
Wrap
Text File
|
1997-04-14
|
423b
|
14 lines
void CMyView::OnDraw (CDC* pDC)
{
CBrush brush;
if ((pDC->GetDeviceCaps (NUMCOLORS) == 2) &&
(pDC->m_hDC != pDC->m_hAttribDC))
brush.CreateSolidBrush (RGB (76, 76, 76)); // Grayscale red
else
brush.CreateSolidBrush (RGB (255, 0, 0)); // Genuine red
CBrush* pOldBrush = pDC->SelectObject (&brush);
pDC->Ellipse (0, 0, 400, 200);
pDC->SelectObject (pOldBrush);
}